package JdbcTemplate;

import org.springframework.jdbc.core.JdbcTemplate;
import utils.JDBCUtils;

public class Demo1 {
    public static void main(String[] args) {
        JdbcTemplate template = new JdbcTemplate(JDBCUtils.getDataSource());
        //创建对象,获取连接池对象
        String sql = "update account set balance = 50 where id=?";
        int count = template.update(sql,3);
        //后面的3是传给?的
        System.out.println(count);
    }
}
